import React from "react"
import ReactDOM from "react-dom/client"
import App from "@/App"
import ErrorBoundary from "./ErrorBoundary"
import { Monitor } from "./monitor"

const monitor = new Monitor({
    appId: "201901064119",
    userId: "3121114",
    isPerformance: false,
    isRecordScreen: true,
    duration: 5 // 记录前后10秒的数据
})
monitor.init()

const root = ReactDOM.createRoot(document.getElementById("root") as HTMLElement)
root.render(
    // <React.StrictMode>
    <ErrorBoundary fallback={<div>错误了</div>}>
        <App />
    </ErrorBoundary>
    // </React.StrictMode>
)

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals()
